@import "variables";
@import "mixin";

.panel-toggle, .panel-remove {
  float: right;
  cursor: pointer;
  margin: 0 0 0 5px;
  &:hover {
    color: $link-hover-bg-color;
    @include gal-transition($duration: 0.3s, $timing-function: ease);
  }
}

.panel ul.list-group {
  // max-height: 500px;
  width: 100%;
  @include gal-transition($duration: 0.3s, $timing-function: ease);
}

.panel.toggled ul.list-group {
  max-height: 0;
  width: 100%;
  overflow: hidden;
  @include gal-transition($duration: 0.3s, $timing-function: ease);
}

.panel-gal > .panel-heading {
  color: #fff;
  background-color: $sidebar-panel-head-bg-color;
  border-color: #000;
}

.panel.toggled .panel-heading {
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
  @include gal-transition($duration: .3s, $timing-function: ease);
}

.panel-gal .badge {
  background-color: $link-hover-bg-color;
}

.panel-gal a {
  color: $sidebar-panel-link-color;
  &:hover {
    color: $sidebar-panel-link-hover-color;
  }
}

.panel .post-title {
  display: inline-block;
  width: 75%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#sidebar {
  aside > div {
    margin-bottom: 30px;
  }
  div.search {
    margin-bottom: 20px;
    padding: 8px;
    border-radius: 4px;
    background-color: $sidebar-search-bg-color;
    input[type="text"] {
      width: 85%;
      float: left;
      margin-right: 10px;
      background-color: transparent;
      &:focus {
        background-color: #fff;
        @include gal-box-shadow($focus-box-shadow);
      }
    }
    button {
      float: left;
      margin-top: 2px;
    }
  }
}

.author-panel {
  padding: 20px 0;
  img.author-image {
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    &:hover {
      @include gal-transition($duration: .3s, $timing-function: ease);
      @include gal-transform(rotate(360deg));
    }
  }
  p.author-description {
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
  }
}

.nav > li {
  > a {
    &:hover, &:focus {
      text-decoration: none;
      background-color: $red;
      @include gal-transition($duration: .25s);
    }
  }
}

.nav-pills {
  > li.active {
    a {
      color: #fff;
      background-color: $red;
      &:hover, &:focus {
        color: #fff;
        background-color: $red;
      }
    }
  }
}

ul.pills-gal {
  padding: 10px;
  li {
    margin-left: 5px;
    a {
      border-radius: 5px;
      &:hover {
        color: #fff;
      }
    }
  }
}

.tab-content {
  border-top: 1px solid $sidebar-tab-content-bd-color;
  padding: 10px;
}

.panel-gal {
  .tab-content, .nav-pills {
    a {
      &:hover {
        color: #fff;
      }
    }
  }
}

#sidebar-tags a:hover {
  color: #fff;
}

.cloud-tags a {
  display: inline-block;
  color: #fff;
  opacity: 0.7;
  padding: 2px 6px 3px;
  margin: 0 2px;
  &:hover {
    opacity: 1;
  }
}

.cloud-tags a:nth-child(7n+1) {
  background-color: $sidebar-tab-tags-7-1-bg-color;
}

.cloud-tags a:nth-child(7n+2) {
  background-color: $sidebar-tab-tags-7-2-bg-color;
}

.cloud-tags a:nth-child(7n+3) {
  background-color: $sidebar-tab-tags-7-3-bg-color;
}

.cloud-tags a:nth-child(7n+4) {
  background-color: $sidebar-tab-tags-7-4-bg-color;
}

.cloud-tags a:nth-child(7n+5) {
  background-color: $sidebar-tab-tags-7-5-bg-color;
}

.cloud-tags a:nth-child(7n+6) {
  background-color: $sidebar-tab-tags-7-6-bg-color;
}

.cloud-tags a:nth-child(7n) {
  background-color: $sidebar-tab-tags-7-bg-color;
}

#sidebar-recent_comments {
  .author-avatar .avatar {
    border-radius: 50%;
    border: 1px solid #eee;
    position: relative;
    z-index: 99;
    float: left;
    display: block;
    @include gal-transition($duration: .3s, $timing-function: ease);
    &:hover {
      @include gal-transform(scale(1.25));
      @include gal-transition($duration: .3s, $timing-function: ease);
    }
  }

  .hint, [data-hint2] {
    display: block;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    color: #666;
    cursor: url(../imgs/mouse2.cur), url(../imgs/mouse2.cur), auto;
    &:hover {
      color: #b94a48;
      &:before, &:after {
        visibility: visible;
        opacity: 1;
        -webkit-transition-delay: 100ms;
        -moz-transition-delay: 100ms;
        transition-delay: 100ms;
      }
    }
    &:focus {
      &:before, &:after {
        visibility: visible;
        opacity: 1;
      }
    }
  }

  .hint--left {
    &:hover, &:focus {
      &:before, &:after {
        @include gal-transform(translateX(-8px));
      }
    }
  }

  .hint:before, [data-hint2]:before {
    content: '';
    position: absolute;
    background: transparent;
    border: 6px solid transparent;
    z-index: 1000001;
  }
  .hint:after, [data-hint2]:after {
    content: attr(data-hint2);
    background: $sidebar-hint-color;
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 12px;
    white-space: nowrap;
  }
  .hint:before, .hint:after, [data-hint2]:before, [data-hint2]:after {
    position: absolute;
    @include gal-transform(translate3d(0,0,0));
    visibility: hidden;
    opacity: 0;
    z-index: 1000000;
    pointer-events: none;
    @include gal-transition($duration: 0.3s, $timing-function: ease);
    -webkit-transition-delay: 0ms;
    -moz-transition-delay: 0ms;
    transition-delay: 0ms;
  }
  .hint--left:before {
    border-left-color: $sidebar-hint-color;
    margin-right: -12px;
    margin-bottom: -6px;
  }
  .hint--left:before, .hint--left:after {
    right: 100%;
    bottom: 50%;
  }
  .hint--rounded:after {
    border-radius: 4px;
  }
  .hint--left:after {
    margin-bottom: -14px;
  }

  .comment-log {
    line-height: 20px;
    background-color: #eee;
    border-color: #eee;
    border-radius: 4px;
    display: inline-block;
    padding: 8px;
    margin-left: 10px;
    // white-space: nowrap;
    // text-overflow: ellipsis;
    // overflow: hidden;
    width: 80%;
  }

}